package com.tx.admin.util.common;

import com.tx.admin.modules.base.entity.SystemEntity;

public class SystemUtil {

    private static boolean openSave;

    private static boolean openDelete;

    private static boolean openDataFunction;

    private static boolean openDataPermission;

    //初始化
    public static void init(SystemEntity sys){
        SystemUtil.openSave=sys.getOpenSave();
        SystemUtil.openDataFunction=sys.getOpenDataFunction();
        SystemUtil.openDataPermission=sys.getOpenDataPermission();
        SystemUtil.openDelete=sys.getOpenDelete();
    }

    public static boolean isOpenSave() {
        return openSave;
    }

    public static boolean isOpenDelete() {
        return openDelete;
    }

    public static boolean isOpenDataFunction() {
        return openDataFunction;
    }

    public static boolean isOpenDataPermission() {
        return openDataPermission;
    }
}
